package com.ruoyi.hotel.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hotel.mapper.HotelRoomChangeMapper;
import com.ruoyi.hotel.domain.HotelRoomChange;
import com.ruoyi.hotel.service.IHotelRoomChangeService;

/**
 * 酒店房间变动Service业务层处理
 *
 * @author iis
 * @date 2024-03-30
 */
@Service
public class HotelRoomChangeServiceImpl implements IHotelRoomChangeService
{
    @Autowired
    private HotelRoomChangeMapper hotelRoomChangeMapper;

    /**
     * 查询酒店房间变动
     *
     * @param id 酒店房间变动主键
     * @return 酒店房间变动
     */
    @Override
    public HotelRoomChange selectHotelRoomChangeById(Long id)
    {
        return hotelRoomChangeMapper.selectHotelRoomChangeById(id);
    }

    /**
     * 查询酒店房间变动列表
     *
     * @param hotelRoomChange 酒店房间变动
     * @return 酒店房间变动
     */
    @Override
    public List<HotelRoomChange> selectHotelRoomChangeList(HotelRoomChange hotelRoomChange)
    {
        return hotelRoomChangeMapper.selectHotelRoomChangeList(hotelRoomChange);
    }

    /**
     * 新增酒店房间变动
     *
     * @param hotelRoomChange 酒店房间变动
     * @return 结果
     */
    @Override
    public int insertHotelRoomChange(HotelRoomChange hotelRoomChange)
    {
        hotelRoomChange.setCreateTime(DateUtils.getNowDate());
        return hotelRoomChangeMapper.insertHotelRoomChange(hotelRoomChange);
    }

    /**
     * 修改酒店房间变动
     *
     * @param hotelRoomChange 酒店房间变动
     * @return 结果
     */
    @Override
    public int updateHotelRoomChange(HotelRoomChange hotelRoomChange)
    {
        hotelRoomChange.setUpdateTime(DateUtils.getNowDate());
        return hotelRoomChangeMapper.updateHotelRoomChange(hotelRoomChange);
    }

    /**
     * 批量删除酒店房间变动
     *
     * @param ids 需要删除的酒店房间变动主键
     * @return 结果
     */
    @Override
    public int deleteHotelRoomChangeByIds(Long[] ids)
    {
        return hotelRoomChangeMapper.deleteHotelRoomChangeByIds(ids);
    }

    /**
     * 删除酒店房间变动信息
     *
     * @param id 酒店房间变动主键
     * @return 结果
     */
    @Override
    public int deleteHotelRoomChangeById(Long id)
    {
        return hotelRoomChangeMapper.deleteHotelRoomChangeById(id);
    }
}
